<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="cn.biwysh.exam.entity.User"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

String userName = "";
String userRight = "";
String logerTime="";
User vUser = null;
if (session.getAttribute("user") != null) {
	vUser = (User) session.getAttribute("user");
	if (vUser != null) {
		userName = vUser.getUname();
		userRight =vUser.getRole();
		logerTime=vUser.getLasttimestr();
	}
}else{
	response.sendRedirect("login.do");
}
String jspName="";
if (request.getParameter("jspName") != null) {
	jspName = request.getParameter("jspName") ;
}
%>
<style type="text/css">
*{
padding:0px;
margin:0px;
}
<!-- 
.page_top_all {
	width: 100%;
	height: 122px;
	margin-top: 0px;
	margin-right: auto;
	margin-bottom: 0px;
	margin-left: auto;
	text-align: center;	
	font-size:12px;
	font-family:宋体;
}
.pttop{
  width:955px;
  height:83px;
  background-image: url(img/gl/tbg.gif);
  background-repeat: repeat-x;
}
.pttop1{
  width:239px;
  height:83px;
  float:left;
  background-image: url(img/gl/top1.jpg);
}
.pttop2{
  width:239px;
  height:83px;
  float:left;
  background-image: url(img/gl/top2.gif);
}
.pttop3{
  width:69px;
  height:83px;
  float:left;
  background-image: url(img/gl/top3.gif);
}
.pttop4{
  height:83px;
  float:left;
  width:400px;
}
.loginfo{
  background-image: url(img/gl/03.jpg);
  background-repeat: no-repeat;
  background-position: 32px 6px;
  padding:4px 0 0 50px;;
  display: block;
  float:left;
  color:white;
}
.logout{
  background-image: url(img/gl/tout.jpg);
  background-repeat: no-repeat;
  background-position:0px 0px;
  padding:4px 0 0 25px;
  float:left;
  font-size:12px;
  color:white;
  cursor: pointer;
  float:right;
  height:30px;
  margin:22px 30px 0 0;
}
.ptbottom{
  width:955px;
  height:39px;
  background-image: url(img/gl/tbg1.gif);
  background-repeat: repeat-x;
}
.uinfo{
  background-image: url(img/gl/tag1.gif);
  background-repeat: no-repeat;
  background-position: 12px 6px;
  padding:5px 0 0 30px;
  float:left;
  margin-top:8px;
  text-align:left;
  width:200px;
}
.nav{
  list-style-type:none;
}
.nav li{
  float:left;
  width:140px;
  margin-top:-10px;
}
.nav div{
  height:17px;
}
.clear{
  clear: both;
}
-->
</style>
<script type="text/javascript">
 function getTime(){
	 var myDate = new Date();  
	 document.getElementById("datenow").innerText = myDate.getFullYear()+"年"+(myDate.getMonth()+1)+"月"+myDate.getDate()+"日  "+getWeek(myDate.getDay());
 }
 function getWeek(day){
        switch(day){
        case 0:return "星期日";
        case 1:return "星期一";
        case 2:return "星期二";
        case 3:return "星期三";
        case 4:return "星期四";
        case 5:return "星期五";
        case 6:return "星期六";
        }
	 }
</script>
<body onload="getTime();">
<div class="page_top_all">
  <div class="pttop">
    <div class="pttop1"></div>
    <div class="pttop2"></div>
    <div class="pttop3"></div>
    <div class="pttop4">
	    <span class="loginfo"><span id="datenow"></span>&nbsp;上次登录时间 <%=logerTime %></span>
	    <div class="clear"></div>
	    <div class="logout" onclick="window.open('<%=request.getContextPath()%>/gl/logout.do', '_self')">退出 </div>
    </div>
  </div>
  <div class="ptbottom">
    <div class="uinfo">欢迎您：<%=userName %> 角色：<%=userRight %></div>
    <ul class="nav">
    <% if(jspName.equals("tgModuleOpt")){%>
       <li><div id="tg" style="background-image: url(img/gl/e.jpg);width:121px;height:29px; margin-top:6px;"></div></li>
    <%}else{%>
       <li><div id="tg" style="background-image: url(img/gl/navtg.gif);width:98px;cursor:pointer;margin-top:9px;" onclick="window.location.href = '<%=request.getContextPath()%>/gl/tjtg.do?page=tjtg'" ></div></li>
    <%}%>
    <% if(jspName.equals("zskModuleOpt")){%>
       <li><div id="zsk" style="background-image: url(img/gl/b.jpg);width:135px;height:29px; margin-top:6px;"></div></li>
    <%}else{%>
       <li><div id="zsk" style="background-image: url(img/gl/navzsk.gif);width:116px;cursor:pointer;margin-top:9px;" onclick="window.location.href = '<%=request.getContextPath()%>/gl/zsgl.do?page=tjzs'"></div></li>
    <%}%>
    <% if(jspName.equals("wtModuleOpt")){%>
       <li><div id="wt" style="background-image: url(img/gl/c.jpg);width:121px;height:29px; margin-top:6px;"></div></li>
    <%}else{%>
       <li><div id="wt" style="background-image: url(img/gl/navwt.gif);width:96px;cursor:pointer;margin-top:9px;" onclick="window.location.href = '<%=request.getContextPath()%>/gl/wtgl.do?page=tj'"></div></li>
    <%}%>
    <%if(vUser.getRight()==0){%>
    	<% if(jspName.equals("khModuleOpt")){%>
         <li><div id="kh" style="background-image: url(img/gl/d.jpg);width:121px;height:29px; margin-top:6px;"></div></li>
	    <%}else{%>
	       <li><div id="kh" style="background-image: url(img/gl/navkh.gif);width:96px;cursor:pointer;margin-top:9px;" onclick="window.location.href = '<%=request.getContextPath()%>/gl/khgl.do?page=tjkh'"></div></li>
	    <%}%>
    <%} %>
    <% if(jspName.equals("yhModuleOpt")){%>
       <li><div id="yh" style="background-image: url(img/gl/e.jpg);width:121px;height:29px; margin-top:6px;"></div></li>
    <%}else{%>
       <li><div id="yh" style="background-image: url(img/gl/navyh.gif);width:96px;cursor:pointer;margin-top:9px;" onclick="window.location.href = '<%=request.getContextPath()%>/gl/yhgl.do?page=tjyh'"></div></li>
    <%}%>   
    </ul>
  </div>
</div>
</body>